package com.csyaonie.android;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.csyaonie.android.utils.ToastUtil;
import com.csyaonie.android.widget.CustomDialog;

public class CustomDialogActivity extends AppCompatActivity {

    private Button btn_custom_dialog1;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_custom_dialog);
        btn_custom_dialog1=findViewById(R.id.btn_custom_dialog1);
        btn_custom_dialog1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                CustomDialog customDialog=new CustomDialog(CustomDialogActivity.this);
                customDialog.setTitle("提示").setMsg("确定删除此项?").setCancel("取消", new CustomDialog.ICancelClickListener() {
                    @Override
                    public void onClick() {
                        ToastUtil.showLong(CustomDialogActivity.this,"取消");
                    }
                }).setConfirm("确定", new CustomDialog.IConfirmClickListener() {
                    @Override
                    public void onClick() {
                        ToastUtil.showLong(CustomDialogActivity.this,"确定");
                    }
                }).show();
            }
        });
    }
}